#ifndef SAW_H
#define	SAW_H

#include <cstdlib>
#include <unordered_map>

class SAW {
public:
    SAW(unsigned long stepsizes[], size_t amountstepsizes, unsigned int seed);
    unsigned long walk();
private:	
	struct Point{
    	long x;
    	long y;
    };

    static const Point startPoint = {0,0};
    unsigned long directions;
    unsigned long stepsize;
    unsigned long* stepsizes;
    size_t stepsizeCounter;
    size_t amountstepsizes;

    void add(Point point);
    bool canGoNord(Point point);
    bool canGoEast(Point point);
    bool canGoSouth(Point point);
    bool canGoWest(Point point);
    unsigned long newstepsize();
    unsigned long getDirection(unsigned int number);
};

#endif	/* RANDOMWALK_H */
